import 'package:safetymonitor/generated/json/base/json_field.dart';
import 'package:safetymonitor/generated/json/preventive_rectification_get_entity.g.dart';
import 'dart:convert';
export 'package:safetymonitor/generated/json/preventive_rectification_get_entity.g.dart';

@JsonSerializable()
class PreventiveRectificationGetEntity {

	PreventiveRectificationGetEntity();

	factory PreventiveRectificationGetEntity.fromJson(Map<String, dynamic> json) => $PreventiveRectificationGetEntityFromJson(json);
	late int id = 0;
	late String preventiveName = '';
	late int companyId = 0;
	String companyName='';
	late int findTime = 0;
	late int rectificationDeadline = 0;
	dynamic uploaderId;
	dynamic uploaderName;
	late int status = 0;
	/// 1可以验收  0不可以验收/空
	late int canClick = 0;
	late int fenCompanyApproveStatus = 0;
	late String creator = '';
	late String rectificationRequire = '';
	late String source = '';
	late String problemDesc = '';
	late String fileUrl = '';
	dynamic acceptanceStatus;
	late String acceptanceDesc='';
	late	String acceptanceFileUrl='';
	late int createTime = 0;
	late int approvalTime = 0;
	String rectificationPersonName ='';
	late	int rectificationPersonId =0 ;
	/// 责任部门
	String? deptNames = '';
	String? deptIds = '';
	/// 责任人
	String? responsibleUserNames = '';
	String? responsibleUsers = '';
	/// 整改部门id集合
	String? rectificationDeptIds = '';
	String? rectificationDeptNames = '';
	/// 整改用户id集合
	String? rectificationUserIds = '';
	String? rectificationUserNames = '';
	late List<PreventiveRectificationGetRecordDOS> recordDOS = [];

	Map<String, dynamic> toJson() => $PreventiveRectificationGetEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class PreventiveRectificationGetRecordDOS {

	PreventiveRectificationGetRecordDOS();

	factory PreventiveRectificationGetRecordDOS.fromJson(Map<String, dynamic> json) => $PreventiveRectificationGetRecordDOSFromJson(json);
	late int createTime = 0;
	late int updateTime = 0;
	late String creator = '';
	late String updater = '';
	late bool deleted = false;
	late int id = 0;
	late int preventiveId = 0;
	dynamic companyId;
	dynamic rectificationPersonId;
	late String rectificationPersonName='';
	late int rectificationTime = 0;
	late String rectificationProgress = '';
	late String rectificationActions = '';
	late String rectificationDesc = '';
	late String rectificationFile= '';

	Map<String, dynamic> toJson() => $PreventiveRectificationGetRecordDOSToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}